﻿using leapt.Domain.Entities;
using leapt.Repositories;
using System;
using System.Collections.Generic;
using System.Text;

namespace leapt.Services
{
    public class UserService : GenericService<User>, IUserService
    {
        private readonly IUserRepository _userRepository;

        public UserService(IUserRepository repository):base(repository)
        {
            _userRepository = repository;
        }

        /// <summary>
        /// 通过登陆名称查询
        /// </summary>
        /// <param name="loginName"></param>
        /// <returns></returns>
        public User FindByLoginName(string loginName)
        {
            return _userRepository.FindByClause(x => x.LoginName == loginName);
        }
    }
}
